package com.itheima.day14.Hashtable.test1;

import java.util.Hashtable;

public class TestPlus {
    public static void main(String[] args) throws InterruptedException {
        Hashtable<String, String> ht = new Hashtable<>();

        new Thread(() -> {
            for (int i = 1; i <= 25; i++) {
                ht.put("" + i, "" + i);
            }
        }).start();

        new Thread(() -> {
            for (int i = 26; i <= 50; i++) {
                ht.put("" + i, "" + i);
            }
        }).start();

        Thread.sleep(1000);
        for (int i = 1; i <= 50 ; i++) {
            System.out.println(ht.get("" + i));
        }

    }
}
